import request from "./request";

const baseURL = '/media'
//
const search = (seachForm) => {
  return request.doRequest(`${baseURL}/search`, {params: seachForm})
};

//
const tvPopular = (seachForm) => {
  return request.doRequest(`${baseURL}/popular/tv`, {params: seachForm})
};
const moviePopular = (seachForm) => {
  return request.doRequest(`${baseURL}/popular/movie`, {params: seachForm})
};

//
const tvNow = (seachForm) => {
  return request.doRequest(`${baseURL}/now/tv`, {params: seachForm})
};
const movieNow = (seachForm) => {
  return request.doRequest(`${baseURL}/now/movie`, {params: seachForm})
};

const getByTmdbid = (seachForm) => {
  return request.doRequest(`${baseURL}/getByTmdbid`, {params: seachForm})
};


const MediaApi = {
    tvPopular, moviePopular, search, tvNow, movieNow, getByTmdbid
};
export default MediaApi;
